from django.db import models

from utils.BaseModel import BaseModel


# Create your models here.
class User(BaseModel):
    username = models.CharField(max_length=32,blank=True,null=True)
    password = models.CharField(max_length=32,blank=True,null=True)
    email = models.EmailField(blank=True,null=True)
    phone = models.CharField(max_length=11,blank=True,null=True)
    score = models.IntegerField(default=0)
    level = models.IntegerField(default=1,choices=((1,'普通用户'),(2,'白金会员'),(3,'黄金会员'),(4,'钻石会员')))
    class Meta:
         db_table = 'user'
    def __str__(self):
        return self.username